﻿using System.Xml.Serialization;
using Kiva7.Translations;

namespace Kiva7.DataClasses
{
    public class Description
    {
        //- <description>
        //- <languages type="list">
        //  <language>en</language> 
        //  </languages>
        //  </description>

        [XmlElement("texts")]
        public Texts Texts { get; set; }
    }

    public class Texts
    {
        [XmlElement("en")]
        public string English { get; set; }

        private Translation _translation;
        [XmlIgnore]
        public Translation Translation
        {
            get
            {
                if (_translation == null)
                {
                    _translation = new Translation(English);
                }
                return _translation;
            }
        }

    }
}
